package com.ssm.zhihu_ssm.service.impl;

import com.ssm.zhihu_ssm.dao.RecommendDao;
import com.ssm.zhihu_ssm.entity.Recommend;
import com.ssm.zhihu_ssm.service.RecommendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service(value = "RecommendService")
public class RecommendServiceImpl implements RecommendService {

    @Resource
    private RecommendDao recommendDao;

    @Override
    public List<Recommend> getRecommend(int uid) {
        return recommendDao.getRecommend(uid);
    }

    @Override
    public List<Recommend> getAllAnswerByQuestionId(int question_id) {
        return recommendDao.getAllAnswerByQuestionId(question_id);
    }

    @Override//关注
    public List<Recommend> getFollowAnswerByUserId(int uid) {
        return recommendDao.getFollowAnswerByUserId(uid);
    }

    @Override//收藏的回答
    public List<Recommend> getCollectAnswerByUserId(int uid) {
        return recommendDao.getCollectAnswerByUserId(uid);
    }

    @Override
    public List<Recommend> getAnswerByUserId(int uid) {
        return recommendDao.getAnswerByUserId(uid);
    }

}
